package com.hospital.pharmacy.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class SalesRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SalesRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdIsNull() {
            addCriterion("sal_rec_ivtr_id is null");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdIsNotNull() {
            addCriterion("sal_rec_ivtr_id is not null");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdEqualTo(Integer value) {
            addCriterion("sal_rec_ivtr_id =", value, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdNotEqualTo(Integer value) {
            addCriterion("sal_rec_ivtr_id <>", value, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdGreaterThan(Integer value) {
            addCriterion("sal_rec_ivtr_id >", value, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("sal_rec_ivtr_id >=", value, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdLessThan(Integer value) {
            addCriterion("sal_rec_ivtr_id <", value, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdLessThanOrEqualTo(Integer value) {
            addCriterion("sal_rec_ivtr_id <=", value, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdIn(List<Integer> values) {
            addCriterion("sal_rec_ivtr_id in", values, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdNotIn(List<Integer> values) {
            addCriterion("sal_rec_ivtr_id not in", values, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdBetween(Integer value1, Integer value2) {
            addCriterion("sal_rec_ivtr_id between", value1, value2, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecIvtrIdNotBetween(Integer value1, Integer value2) {
            addCriterion("sal_rec_ivtr_id not between", value1, value2, "salRecIvtrId");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeIsNull() {
            addCriterion("sal_rec_time is null");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeIsNotNull() {
            addCriterion("sal_rec_time is not null");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeEqualTo(Date value) {
            addCriterionForJDBCDate("sal_rec_time =", value, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("sal_rec_time <>", value, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("sal_rec_time >", value, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("sal_rec_time >=", value, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeLessThan(Date value) {
            addCriterionForJDBCDate("sal_rec_time <", value, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("sal_rec_time <=", value, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeIn(List<Date> values) {
            addCriterionForJDBCDate("sal_rec_time in", values, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("sal_rec_time not in", values, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("sal_rec_time between", value1, value2, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("sal_rec_time not between", value1, value2, "salRecTime");
            return (Criteria) this;
        }

        public Criteria andSalRecCountIsNull() {
            addCriterion("sal_rec_count is null");
            return (Criteria) this;
        }

        public Criteria andSalRecCountIsNotNull() {
            addCriterion("sal_rec_count is not null");
            return (Criteria) this;
        }

        public Criteria andSalRecCountEqualTo(Integer value) {
            addCriterion("sal_rec_count =", value, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountNotEqualTo(Integer value) {
            addCriterion("sal_rec_count <>", value, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountGreaterThan(Integer value) {
            addCriterion("sal_rec_count >", value, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountGreaterThanOrEqualTo(Integer value) {
            addCriterion("sal_rec_count >=", value, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountLessThan(Integer value) {
            addCriterion("sal_rec_count <", value, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountLessThanOrEqualTo(Integer value) {
            addCriterion("sal_rec_count <=", value, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountIn(List<Integer> values) {
            addCriterion("sal_rec_count in", values, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountNotIn(List<Integer> values) {
            addCriterion("sal_rec_count not in", values, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountBetween(Integer value1, Integer value2) {
            addCriterion("sal_rec_count between", value1, value2, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecCountNotBetween(Integer value1, Integer value2) {
            addCriterion("sal_rec_count not between", value1, value2, "salRecCount");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceIsNull() {
            addCriterion("sal_rec_price is null");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceIsNotNull() {
            addCriterion("sal_rec_price is not null");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceEqualTo(Double value) {
            addCriterion("sal_rec_price =", value, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceNotEqualTo(Double value) {
            addCriterion("sal_rec_price <>", value, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceGreaterThan(Double value) {
            addCriterion("sal_rec_price >", value, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceGreaterThanOrEqualTo(Double value) {
            addCriterion("sal_rec_price >=", value, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceLessThan(Double value) {
            addCriterion("sal_rec_price <", value, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceLessThanOrEqualTo(Double value) {
            addCriterion("sal_rec_price <=", value, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceIn(List<Double> values) {
            addCriterion("sal_rec_price in", values, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceNotIn(List<Double> values) {
            addCriterion("sal_rec_price not in", values, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceBetween(Double value1, Double value2) {
            addCriterion("sal_rec_price between", value1, value2, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecPriceNotBetween(Double value1, Double value2) {
            addCriterion("sal_rec_price not between", value1, value2, "salRecPrice");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalIsNull() {
            addCriterion("sal_rec_total is null");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalIsNotNull() {
            addCriterion("sal_rec_total is not null");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalEqualTo(Double value) {
            addCriterion("sal_rec_total =", value, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalNotEqualTo(Double value) {
            addCriterion("sal_rec_total <>", value, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalGreaterThan(Double value) {
            addCriterion("sal_rec_total >", value, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalGreaterThanOrEqualTo(Double value) {
            addCriterion("sal_rec_total >=", value, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalLessThan(Double value) {
            addCriterion("sal_rec_total <", value, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalLessThanOrEqualTo(Double value) {
            addCriterion("sal_rec_total <=", value, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalIn(List<Double> values) {
            addCriterion("sal_rec_total in", values, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalNotIn(List<Double> values) {
            addCriterion("sal_rec_total not in", values, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalBetween(Double value1, Double value2) {
            addCriterion("sal_rec_total between", value1, value2, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecTotalNotBetween(Double value1, Double value2) {
            addCriterion("sal_rec_total not between", value1, value2, "salRecTotal");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkIsNull() {
            addCriterion("sal_rec_remark is null");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkIsNotNull() {
            addCriterion("sal_rec_remark is not null");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkEqualTo(String value) {
            addCriterion("sal_rec_remark =", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkNotEqualTo(String value) {
            addCriterion("sal_rec_remark <>", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkGreaterThan(String value) {
            addCriterion("sal_rec_remark >", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkGreaterThanOrEqualTo(String value) {
            addCriterion("sal_rec_remark >=", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkLessThan(String value) {
            addCriterion("sal_rec_remark <", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkLessThanOrEqualTo(String value) {
            addCriterion("sal_rec_remark <=", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkLike(String value) {
            addCriterion("sal_rec_remark like", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkNotLike(String value) {
            addCriterion("sal_rec_remark not like", value, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkIn(List<String> values) {
            addCriterion("sal_rec_remark in", values, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkNotIn(List<String> values) {
            addCriterion("sal_rec_remark not in", values, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkBetween(String value1, String value2) {
            addCriterion("sal_rec_remark between", value1, value2, "salRecRemark");
            return (Criteria) this;
        }

        public Criteria andSalRecRemarkNotBetween(String value1, String value2) {
            addCriterion("sal_rec_remark not between", value1, value2, "salRecRemark");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}